package com.glory.cqaospda.viewmodel

import com.glory.cqaospda.model.TaskRepository
import com.glory.mvvmnet.base.BaseViewModel
import com.glory.mvvmnet.entity.CallObserveBean
import com.google.gson.JsonObject

class Repair2Model:BaseViewModel() {

    private val repository by lazy { TaskRepository() }

    fun defaultGetBaseConfig(){

        val map = JsonObject()

        launchOnlyResult({
            val maintenanceBean =
                repository.defaultGetMaintenance(map,"EMS_Maintenance")
            defUI.callObserve.value = CallObserveBean(1,maintenanceBean)
        })
    }

    fun defaultMaintenanceOrder(map : JsonObject){

        launchOnlyResult({
            repository.defaultGetMaintenance(map,"EMS_MaintenanceOrder")
            defUI.callObserve.value = CallObserveBean(2)
        })
    }

}